package main

import (
	"fmt"
)

func hello(i *int) int {
	defer func() {
		*i = 19
	}()
	return *i
}

func hello1(i *int) (j int) {
	defer func() {
		*i = 20
		j = 19
	}()
	return *i
}

func main() {
	i := 10
	j := hello(&i)
	fmt.Println(i, j) //19,10

	i = 10
	j = hello1(&i)
	fmt.Println(i, j) //20,19
}
